/*
 * Copyright (C) 2016 Jonathon Love
 */

.dialog-widget.background {
    background-color: rgba(0, 0, 0, .2) !important;
}

.dialog-widget.prompt,
.dialog-widget.confirm {
    top: calc(33% - 115px) !important;
    background-color: #F0F0F0 !important;
    border: 1px solid #ACACAC !important;
    border-radius: 2px !important;
    box-shadow: none !important;
}

.dialog-widget .divider {
    border-top: none !important;
}

.dialog-widget input {
    border-radius: 2px !important;
    border-color: #D0D0D0 !important;
}

.dialog-widget input:focus {
    outline: none !important;
    border: 1px solid #3E6DA9 !important;
}

.dialog-widget .ok, .dialog-widget .cancel {
    border-radius: 2px !important;
    color: inherit !important;
    background-color: #A9C6F2 !important;
    width: calc(50% - 5px) !important;
}

.dialog-widget .ok:hover, .dialog-widget .cancel:hover {
    background-color: #7fAAEC !important;
}

.dialog-widget .ok:focus, .dialog-widget .cancel:focus {
    outline: none !important;
    border: 1px solid #3E6DA9 !important;
}

.dialog-widget .url {
    display: none;
}

.dialog-widget .title {
    margin-top: 10px !important;
}

.jmv-tableview.resizing .jmv-column,
.jmv-tableview.resizing .jmv-column-header,
.jmv-tableview.resizing .jmv-table-cell-selected,
.jmv-tableview.resizing .jmv-table-column-highlight {
    transition: none ;
}

.cell-edited {
    color: #376095;
    background-color: rgba(55, 96, 149, .06);
}

.jmv-table-container {
    position: relative ;
    overflow: auto ;
    width: 100% ;
    height: 100% ;
    border-right: 1px solid #ACACAC ;
    border-bottom: 1px solid #ACACAC;
    box-sizing: border-box ;
    background-color: #F8F8F8 ;
}

.jmv-column {
    position: absolute ;
    background-color: white ;
    height: 100%;
}

.jmv-column[data-columntype='computed'],
.jmv-column[data-columntype='recoded'],
.jmv-column[data-columntype='output'],
.jmv-column[data-columntype='filter'] {
    background-color: hsla(0, 0%, 50%, 0.05) ;
}

.jmv-column[data-fmlaok="0"] {
    background-color: #D5AEAB ;
}

.jmv-column-header[data-fmlaok="0"] {
    color: #B5B6B6;
}

.jmv-column-header[data-fmlaok="0"].highlighted {
    color: #979797;
}

.jmv-column-header[data-fmlaok="0"]:hover {
    color: #E5E5E5;
}


.jmv-column[data-active="0"] {
    background-color: #eeeeee ;
}

.jmv-column-header[data-active="0"] {
    color: #B5B6B6;
}

.jmv-column-header[data-active="0"].highlighted {
    color: #979797;
}

.jmv-column-header[data-active="0"]:hover {
    color: #E5E5E5;
}

.jmv-column,
.jmv-column-header {
    transition: .2s left, .2s background-color ease-out;
}

.jmv-column-row-header {
    position: absolute ;
    z-index: 20 ;
    color: #555555 ;
}

.jmv-table-header {
    position: absolute ;
    width: 100% ;
    z-index: 20 ;
    overflow: hidden ;
    box-sizing: border-box ;
}

.jmv-table-header-background {
    position: absolute ;
    left: 0 ;
    top: 0 ;
    width: 100% ;
    height: 100% ;
    border-bottom: 1px solid #ACACAC ;
    box-sizing: border-box ;
}

.jmv-column-header:first-child {
    padding-left: 0 ;
}

.jmv-column-header {
    position: absolute ;

    top: 0 ;
    border-width: 0 1px 1px 0 ;
    border-style: solid ;
    border-image: linear-gradient(to top, #ACACAC, rgba(0,0,0,0));
    padding: 3px 6px 4px 6px;
    background-color: #E6E6E6 ;
    border-image-slice: 1 ;
    box-sizing: border-box ;

    background-repeat: no-repeat ;
    background-size: auto 80% ;
    background-position: 6px 1px ;
    cursor: url(assets/column-select.svg), auto;
    display: flex;
    align-items: center;
}


.jmv-column-header.highlighted,
.jmv-row-header-cell.highlighted {
    background-color: #CCCCCC ;
    color: #3E6DA9 ;
}

.select-all {
    cursor: cell;
}

.jmv-column-header:not(.place-holder):hover,
.jmv-row-header-cell:hover {
    background-color: #A6BEDE;
}


.jmv-column-cell,
.jmv-column-header-label {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding-left: 4px;
    line-height: normal;
}

.jmv-column-header-icon {
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    height: 16px;
    flex: 0 0 16px;
}

.jmv-column-header-colour {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    position: absolute;
    background-color: #acacac;
    right: 5px;
    top: 3px;
    opacity: 0;
    cursor: default;
    transition: opacity .2s, background-color .2s;
}

.jmv-column-header[data-columntype='computed'] > .jmv-column-header-colour,
.jmv-column-header[data-columntype='recoded'] > .jmv-column-header-colour,
.jmv-column-header[data-columntype='output'] > .jmv-column-header-colour {
    opacity: 1;
}

.jmv-row-header-cell.virtual {
    color: #BFBFBF ;
}

.jmv-column-header:first-child {
    position: relative ;
}

.jmv-column-header-resizer {
    position: absolute ;
    top: -6px ;
    right: -6px ;
    width: 12px ;
    height: 24px ;
    background-color: red ;
    cursor: col-resize ;
    z-index: 30 ;
    opacity: 0 ;
}

.jmv-column-cell[data-type="string"] {
    text-align: left ;
}

.jmv-column-cell[data-type="number"] {
    text-align: right ;
}

.jmv-column-cell[data-type="bool"] {
    text-align: center ;
}

.jmv-column-cell[data-type="bool"] .true,
.jmv-column-cell[data-type="bool"] .false {
    mask-size: auto 55% ;
    mask-repeat: no-repeat;
    mask-position: center ;
    -webkit-mask-image: url('../assets/correct.svg') ;
    -webkit-mask-size: auto 55% ;
    -webkit-mask-repeat: no-repeat ;
    -webkit-mask-position: center ;
    width: 100% ;
    height: 100% ;
}

.jmv-column-cell[data-type="bool"] .true {
    mask-image: url('../assets/correct.svg') ;
    -webkit-mask-image: url('../assets/correct.svg') ;
    background-color: #399B3F ;
}

.jmv-column-cell[data-type="bool"] .false {
    mask-image: url('../assets/incorrect.svg') ;
    -webkit-mask-image: url('../assets/incorrect.svg') ;
    background-color: #BE564D ;
}

[data-active="0"] > .jmv-column-cell[data-type="bool"] * {
    background-color: #C2C2C2 ;
}

[data-fmlaok="0"] > .jmv-column-cell[data-type="bool"] * {
    background-color: transparent ;
}

.jmv-column[data-fmlaok="1"] > .jmv-column-cell[data-filtered="1"] {
    color: #C2C2C2 ;
    background-color: #EEEEEE ;
}

.jmv-column[data-fmlaok="1"] > .jmv-column-cell[data-filtered="1"].cell-edited {
    color: #C2C2C2 ;
    background-color: #e2e6e9 ;
}

.jmv-column-cell[data-missing="1"] {
    color: #C2C2C2;
    font-size: 80%;
}

.jmv-column-cell {
    padding-left: 10px ;
    padding-right: 10px ;
    overflow: hidden ;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.jmv-table-cell-selected {
    position: absolute ;
    border: 1px solid #FFFFFF ;
    z-index: 10 ;
    box-sizing: border-box ;
    transition: left 0.1s, top 0.1s, width 0.1s, height 0.1s ;
    box-shadow: 0 0 0 2px #5E8BC4 ;
    padding: 2px 4px ;
    white-space: no-wrap;
    background-color: rgba(94, 139, 196, .1);
    font-size: 12.8px ;

    left: -100px ; /* overridden by code */
    top: -100px ;
}

.jmv-row-header-cell > .sub-selection-bar {
    opacity: 0;
    transition: opacity .2s;
    width: 100%;
    position: absolute;
    border-right: 2px solid #5e8bc4;
    box-sizing: border-box;
    top: 0px;
    right: -1px;
    bottom: -1px;
    background-color: transparent;
}

.jmv-column-header > .sub-selection-bar {
    opacity: 0;
    transition: opacity .2s;
    height: 100%;
    position: absolute;
    border-bottom: 2px solid #5e8bc4;
    box-sizing: border-box;
    left: 0px;
    bottom: -1px;
    right: -1px;
    background-color: transparent;
}

.highlighted.is-sub-selection > .sub-selection-bar {
    opacity: 1;
}

.jmv-table-cell-secondary-selected, .jmv-table-cell-selected.multi {
    position: absolute;
    border: 1px solid #989898;
    z-index: 9;
    box-sizing: border-box;
    box-shadow: inset 0px 0px 0px 1px #ffffff;
    background-color: rgba(37, 37, 37, 0.1);
    transition: none;
    left: -100px;
    top: -100px;
}

.jmv-table-cell-selected.negative {
    border: 1px solid #989898;
    box-shadow: inset 0px 0px 0px 1px #ffffff;
    background-color: rgba(255, 255, 255, 0.3);
}

.jmv-table-cell-selected.not-editable {
    box-shadow: 0 0 0 2px #9f9f9f ;
    background-color: rgba(110, 110, 110, 0.1);
}

input.jmv-table-cell-selected.copying {
    border: 1px dashed #5E8BC4 ;
}

.jmv-table-cell-selected:not(.editing) {
    cursor: default ;
    pointer-events: none ;
}

.jmv-table-cell-selected[data-measuretype="continuous"],
.jmv-table-cell-selected[data-measuretype="nominal"],
.jmv-table-cell-selected[data-measuretype="ordinal"] {
    text-align: right ;
}

.jmv-table-cell-selected br {
    display: none ;
}

.jmv-table-cell-selected.editing {
    background-color: white ;
}

.jmv-table-row-highlight,
.jmv-table-column-highlight {
    position: absolute ;
    z-index: 40 ;
    pointer-events: none;
}

.jmv-table-row-highlight {
    border-right: 2px solid #5E8BC4 ;
    transition: top 0.1s, width 0.1s, height 0.1s ;
    box-sizing: border-box;
    top: -100px ; /* overridden by code */
}

.jmv-table-column-highlight {
    top: -2px ;
    left: -100px ; /* overridden by code */
    border-bottom: 2px solid #5E8BC4 ;
    transition: left 0.1s, width 0.1s, height 0.1s ;
    pointer-events: none ;
}

.jmv-column-header[data-datatype='integer'][data-measuretype='nominal'] > .jmv-column-header-icon {
    background-image: url('../assets/variable-nominal.svg');
}

.jmv-column-header[data-datatype='text'][data-measuretype='nominal'] > .jmv-column-header-icon {
    background-image: url('../assets/variable-nominal-text.svg');
}

.jmv-column-header[data-datatype='integer'][data-measuretype='ordinal'] > .jmv-column-header-icon {
    background-image: url('../assets/variable-ordinal.svg');
}

.jmv-column-header[data-datatype='text'][data-measuretype='ordinal'] > .jmv-column-header-icon {
    background-image: url('../assets/variable-ordinal-text.svg');
}

.jmv-column-header[data-measuretype='continuous'] > .jmv-column-header-icon {
    background-image: url('../assets/variable-continuous.svg');
}

.jmv-column-header[data-measuretype='id'] > .jmv-column-header-icon {
    background-image: url('../assets/variable-id.svg');
}

.jmv-column-header[data-columntype='filter'] .jmv-column-header-icon {
    display: none;
}

.jmv-column-header[data-fmlaok='0'][data-active='1'] > .jmv-column-header-icon {
    display: block;
    cursor: default;
    background-image: url('../assets/column-error.svg') !important;
}

.jmv-table-body {
    position: absolute ;
    background-color: white ;
    cursor: cell;
}

.jmv-row-header-cell,
.jmv-column-cell {
    position: absolute ;
    box-sizing: border-box ;
    padding: 1px 6px 1px 6px ;
    width: 100% ;
    line-height: normal;
}

.jmv-row-header-cell {
    background-color: #E6E6E6 ;
    text-align: center ;
    border-width: 1px 1px 0 0 ;
    border-style: solid ;
    border-color: #ACACAC ;
    border-image: linear-gradient(to left, #ACACAC, rgba(0,0,0,0)) 1 100% ;
    border-image-slice: 1 ;
    box-sizing: border-box ;
    cursor: url(assets/row-select.svg), auto;
}

.jmv-row-header-cell:first-child {
    border-width: 0 1px 0 0 ;
}

.jmv-row-header-cell:last-child {
    border-width: 1px 1px 1px 0 ;
}

.jmv-row-header-cell.split-above {
    border-image: none ;
    border-top: 3px solid #5E8BC4 ;
}

.jmv-column-cell {
    border: 1px solid #DEDEDE ;
    border-width: 1px 1px 0 0 ;
}

.jmv-column-cell:first-child {
    border-width: 0 1px 0 0 ;
}

.jmv-column-cell:last-child {
    border-width: 1px 1px 1px 0 ;
}
